/**
 * ===========================================================================
 * 版权所有 湖南免了么网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.mianle.me
 * ===========================================================================
 * 10:15 2018/6/13
 */
package com.mianle.userapi.util;

import lombok.Data;
import org.springframework.data.domain.Sort;
import org.springframework.data.redis.connection.RedisGeoCommands;

/**
 * @Author: yiyuan
 * @Description:
 * @Date: Created in 10:15 2018/6/13
 *
 */
@Data
public final class SearchGeo {
    /** key */
    private String key;

    /** 经度 */
    private Double lng;

    /** 维度 */
    private Double lat;

    /** 距离 */
    private Double distance;

    /** 距离单位 */
    private RedisGeoCommands.DistanceUnit distanceUnit;

    /** 排序*/
    private Sort.Direction sort;

    /** 限制条数 */
    private Integer limit;

    public SearchGeo(String key, Double lng, Double lat, Double distance, RedisGeoCommands.DistanceUnit distanceUnit, Sort.Direction sort, Integer limit) {
        this.key = key;
        this.lng = lng;
        this.lat = lat;
        this.distance = distance;
        this.distanceUnit = distanceUnit;
        this.sort = sort;
        this.limit = limit;
    }

    public SearchGeo(String key, Double lng, Double lat, Double distance, RedisGeoCommands.DistanceUnit distanceUnit) {
        this.key = key;
        this.lng = lng;
        this.lat = lat;
        this.distance = distance;
        this.distanceUnit = distanceUnit;
    }
}
